﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StudentWebWithMasterPage
{
    public partial class DataEntry : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnOk_Click(object sender, EventArgs e)
        {
            Session["firstName"] = txtFirstName.Text;
            Session["lastName"] = txtLastName.Text;
            Session["streetAddress"] = txtStreetAddress.Text;
            Session["city"] = txtCity.Text;
            Session["state"] = txtState.Text;
            Session["zip"] = txtZip.Text;

            Response.Redirect("display.aspx");
        }

        protected void btnClear_Click(object sender, EventArgs e)
        {
            txtFirstName.Text = "";
            txtLastName.Text = "";
            txtStreetAddress.Text = "";
            txtCity.Text = "";
            txtState.Text = "";
            txtZip.Text = "";
        }
    }
}